package com.zenghus.prototype.simple;

public class PrototypeTest {
    public static void main(String[] args) {
        Prototype p=new Prototype();
        p.name="niu er";
        p.list.add(new CloneTarget("asdf"));

        try {
            Prototype p1=(Prototype) p.clone();
            System.out.println(p1.name);
            System.out.println(p.list.get(0)+"\t"+p.list.get(0).name);
            System.out.println(p.list.get(0)+"\t"+p.list.get(0).name);
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
